package edu.sctu.practice.class02.hujie.my_practice;

/**
 * Created by hp on 2016/1/6.
 */
public class c {
    public static void main(String[] args) throws ArrayIndexOutOfBoundsException {
        int a[][] = {{1, 2, 4}, {3, 6, 9}, {2, 5, 8}};
        int b[] = {0};
        int i, j;
        try {
            for (i = 0; i < 3; i++) {
                for (j = 0; j < 3; j++) {
                    b[i] = b[i] + a[i][j];
                }
            }
            System.out.println("每行相加等于：" + b[i]);
        } catch (Exception e) {
        }
        System.out.println("你倒是出来呀"+b[0]);
        System.out.println("你倒是出来呀"+b[1]);
        System.out.println("你倒是出来呀"+b[2]);
    }
}
